package com.jiangjun.fetch;

import com.mongodb.BasicDBObject;
import com.mongodb.DBObject;

public class FetchWeibo {

	private String id;
	private String parent_id;
	private String parent_name;
	private String title;
	private String txt;
	private String img_path;
	private String date;
	private String type;// 0是未审核，1是文字，2是图片
	private String isEnable;// 是否展示,0是不展示，1是展示

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getParent_id() {
		return parent_id;
	}

	public void setParent_id(String parent_id) {
		this.parent_id = parent_id;
	}

	public String getParent_name() {
		return parent_name;
	}

	public void setParent_name(String parent_name) {
		this.parent_name = parent_name;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getTxt() {
		return txt;
	}

	public void setTxt(String txt) {
		this.txt = txt;
	}

	public String getImg_path() {
		return img_path;
	}

	public void setImg_path(String img_path) {
		this.img_path = img_path;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getIsEnable() {
		return isEnable;
	}

	public void setIsEnable(String isEnable) {
		this.isEnable = isEnable;
	}

	public DBObject toDbObject() {
		DBObject object = new BasicDBObject();
		if (this.id != null) {
			object.put("id", this.id);
		}
		if (this.parent_id != null) {
			object.put("parent_id", this.parent_id);
		}
		if (this.parent_name != null) {
			object.put("parent_name", this.parent_name);
		}
		if (this.title != null) {
			object.put("title", this.title);
		}
		if (this.txt != null) {
			object.put("txt", this.txt);
		}
		if (this.img_path != null) {
			object.put("img_path", this.img_path);
		}
		if (this.type != null) {
			object.put("type", this.type);
		}
		if (this.date != null) {
			object.put("date", this.date);
		}
		if (this.isEnable != null) {
			object.put("isEnable", this.isEnable);
		}
		return object;
	}
}
